package com.group9.handinhand.service.so;

import org.apache.commons.lang.ArrayUtils;

import com.group9.handinhand.dao.model.PasswordResetLink;
/**
 * Class for service of password reset link
 *
 */
public class PasswordResetLinkSO extends AbstractBaseSO {
	
	private String link;
	
	private UserSO user;
	/**
	 * converts to password reset link model object
	 * @param ignoreProperties
	 * @return
	 */
	public PasswordResetLink convertToModelObject(String... ignoreProperties) {
		PasswordResetLink model = (PasswordResetLink) convert(new PasswordResetLink(),
				(String[]) ArrayUtils.addAll(ignoreProperties,new String[]{"user"}));
		model.setUser(this.user.convertToModelObject());
		return model;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public UserSO getUser() {
		return user;
	}

	public void setUser(UserSO user) {
		this.user = user;
	}

	@Override
	public String toString() {
		return "PasswordResetLinkSO [link=" + link + ", user=" + user + "]";
	}
	
	

}
